feat(weather): add rule-based weather impact summaries#562
Open
feat(weather): add rule-based weather impact summaries#562
Conversation
Adds a new `impact_summary` module with transparent, unit-tested rule sets for three lifestyle contexts: - Outdoor: comfort band from feels-like temperature, UV protection notes, active precipitation warnings - Driving: visibility thresholds, precipitation-type hazards (ice > snow > thunder > rain), near-freezing black-ice risk, wind severity - Allergy: pollen category/index bands with allergen callout, wind dispersion note, air quality modifier Impact summaries appear as "Impact: Outdoor / Driving / Allergy" metrics in the current conditions presentation and are included in screen-reader fallback text. The forecast presentation also receives an impact summary derived from the first forecast period. No new API dependencies required. All rules are fully documented and covered by 128 dedicated unit tests. Closes #324 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/accessiweather/impact_summary.pywith three transparent, rule-based impact scorers: Outdoor (comfort/activity), Driving (visibility/ice/wind/precip), and Allergy (pollen/AQI/wind dispersion)CurrentConditionsPresentationasImpact: Outdoor,Impact: Driving, andImpact: Allergymetrics (included in screen-reader fallback text)impact_summaryfield to bothCurrentConditionsPresentationandForecastPresentationfor downstream consumersRule sets (fully documented in module docstring)
Acceptance criteria
Closes #324